#!/bin/bash

# dumps only for namespaces 0 and 2. see http://en.wikipedia.org/wiki/Wikipedia:Namespace

echo pages...
  mysql -u root wiki_hu -e "select page_id, page_namespace, page_title, page_len, page_counter from page where page_namespace in (0, 2) order by page_title" -s -N > pages
echo links...
  mysql -u root wiki_hu -e "select pl_from, pl_namespace, pl_title from pagelinks where pl_namespace in (0, 2) order by pl_from, pl_namespace" -s -N > links
echo categories...
  mysql -u root wiki_hu -e "select cl_from, cl_to from categorylinks;" -s -N > categories


